package com.dhwl.hsh.merchant.model.impl;

import com.dhwl.hsh.lib.api.ApiManager;
import com.dhwl.hsh.lib.bean.HttpResponse;
import com.dhwl.hsh.lib.bean.req.AddTaskReq;
import com.dhwl.hsh.lib.bean.resp.TaskResp;
import com.dhwl.hsh.merchant.model.ITaskModel;

import rx.Observable;

/**
 * 简要描述
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016-04-13 15:42
 */
public class TaskModel implements ITaskModel {


    private TaskModel() {
    }

    public static final TaskModel instance = new TaskModel();

    public static TaskModel getInstance() {
        return instance;
    }


    @Override
    public Observable<HttpResponse<TaskResp>> addTask(AddTaskReq addTaskReq) {
        return ApiManager.getInstance().getTaskApi().addTask(addTaskReq);
    }

    @Override
    public Observable<HttpResponse<String>> costMoney(AddTaskReq addTaskReq) {
        return ApiManager.getInstance().getTaskApi().costMoney(addTaskReq);
    }
}
